import request from '@/utils/request.js'

// 查询商家订单列表
export function listBorder(query) {
  return request({
    url: '/orderManagement/border/list',
    method: 'get',
    params: query
  })
}

// 查询商家订单详细
export function getBorder(id) {
  return request({
    url: '/orderManagement/border/' + id,
    method: 'get'
  })
}

// 新增商家订单
export function addBorder(data) {
  return request({
    url: '/orderManagement/border',
    method: 'post',
    data: data
  })
}

// 修改商家订单
export function updateBorder(data) {
  return request({
    url: '/orderManagement/border',
    method: 'put',
    data: data
  })
}

// 删除商家订单
export function delBorder(id) {
  return request({
    url: '/orderManagement/border/' + id,
    method: 'delete'
  })
}

//根据商户id查询订单
export function getOrderByMerchantId(merchantId) {
  return request({
    url: '/orderManagement/border/getorderbymerchantid'+merchantId,
    method: 'get',
    params: { merchantId }
  })
}
